package com.morpheus.redis.lettuce.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

import lombok.Data;

@Data
@ConfigurationProperties(prefix = "spring.redis.lettuce")
public class LettuceProperties {
	private int adaptiveRefreshTimeout = 0;
	private int periodicRefreshTimeout = 0;
	private JMX jmx = null;
	private Test test = null;

	@Data
	public static class JMX {
		private boolean enabled = false;
		private Name name = null;

		@Data
		public static class Name {
			private String base = null;
			private String prefix = null;
		}
	}

	@Data
	public static class Test {
		private boolean onBorrow = true;
		private boolean onCreate = false;
		private boolean onReturn = false;
		private boolean whileIdle = true;
	}
}
